<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>微博用户列表</title>
	<link rel="stylesheet" href="__PUBLIC__/Css/common.css" />
	<script type="text/javascript" src='__PUBLIC__/Js/jquery-1.8.2.min.js'></script>
	<script type="text/javascript" src='__PUBLIC__/Js/common.js'></script>
</head>
<body>
	<div class='status'>
		<span>后台管理员列表</span>
	</div>
	<table class="table">
		<tr>
			<th>ID</th>
			<th>管理员名称</th>
			<th>级别</th>
			<th>最后登录时间</th>
			<th>最后登录IP</th>
			<th>账号状态</th>
			<if condition='!$_SESSION["admin"]'>
				<th>操作</th>
			</if>
		</tr>
		<foreach name='admin' item='v'>
			<tr>
				<td width='50' align='center'>{$v.id}</td>
				<td width='120' align='center'>{$v.username}</td>
				<td align='center'>
					<if condition='$v["admin"]'>
						管理员
					<else/>
						超级管理员
					</if>
				</td>
				<td align='center'>{$v.logintime|date='y-m-d H:i', ###}</td>
				<td align='center'>{$v.loginip}</td>
				<td width='60' align='center'>
					<if condition='$v["lock"]'>锁定</if>
				</td>
				<if condition='!$_SESSION["admin"]'>
					<td width='240'>
						<if condition='$v["admin"]'>
							<if condition='$v["lock"]'>
								<a href="{:U('lockAdmin', array('id' => $v['id'], 'lock' => 0))}" class='add lock'>解除锁定</a>
							<else/>
								<a href="{:U('lockAdmin', array('id' => $v['id'], 'lock' => 1))}" class='add lock'>锁定用户</a>
							</if>
							<a href='{:U("delAdmin", array("id" => $v["id"]))}' class='add lock'>删除管理员</a>
						</if>
					</td>
				</if>
			</tr>
		</foreach>
	</table>
</body>
</html>